package com.szrt.day20170427;


public class Student extends Person {
	
	/**
	 * 动态的属性 要访问到动态属性的值：必须首先new出这个类的对象
	 */
	public  Integer studentAge=21;
	
	private  String studentName="zxx";
	
	
	/**
	 * 在公司中 实际上基本上禁止使用带参的构造方法
	 * @param studentAge
	 * @param studentName
	 */
	public Student(Integer studentAge, String studentName) {
		
		super();
		System.out.println("带参的构造方法1...");
		this.studentAge = studentAge;
		this.studentName = studentName;
	}
	public Student(String studentName,Integer studentAge) {
		
		super();
		System.out.println("带参的构造方法2...");
		this.studentAge = studentAge;
		this.studentName = studentName;
	}
	
	public Student(){
		System.out.println("默认的构造方法...");
	}

	public int getStudentAge() {
		return studentAge;
	}

	public  void setStudentAge(int studentAge) {
		this.studentAge = studentAge;
	}

	public String getStudentName() {
		return studentName;
	}

	public void setStudentName(String studentName) {
		this.studentName = studentName;
	}
	
	
	private int add(Integer a ,Integer b){
		return a+b;
	}

	@Override
	public String toString() {
		return "Student [studentAge=" + studentAge + ", studentName=" + studentName + "]";
	}
	
	
	
	
	

}
